package com.neuedu.entity;

import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.sql.Date;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serial;

/**
 * 用户表 实体类。
 *
 * @author Administrator
 * @since 2024-06-03
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("customer")
public class Customer implements Serializable {
    public Customer(String phone, String password, Date createDate) {
        this.phone = phone;
        this.password = password;
        this.createDate = createDate;
    }

    public Customer(Integer id, Date lastLogin) {
        this.id = id;
        this.lastLogin = lastLogin;
    }

    @Serial
    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Auto)
    private Integer id;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 登录密码
     */
    private String password;

    /**
     * 注册日期
     */
    private Date createDate;

    /**
     * 最后一次登录时间
     */
    private Date lastLogin;

    /**
     * 状态
     */
    private Boolean active;

}
